import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqRunBusinessItemBuyHelper } from "./SeqRunBusinessItemBuyHelper";
import { SeqRunBusinessItemSellHelper } from "./SeqRunBusinessItemSellHelper";
type int = number;
//class SRunBusinessNpc
    
    export  class SRunBusinessNpc extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SRunBusinessNpc();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.npcId);
            SeqRunBusinessItemBuyHelper.write(arg1, this.itemBuys);
            SeqRunBusinessItemBuyHelper.write(arg1, this.expensiveItemBuys);
            SeqRunBusinessItemSellHelper.write(arg1, this.itemSells);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.npcId = arg1.readInt();
            this.itemBuys = SeqRunBusinessItemBuyHelper.read(arg1);
            this.expensiveItemBuys = SeqRunBusinessItemBuyHelper.read(arg1);
            this.itemSells = SeqRunBusinessItemSellHelper.read(arg1);
            return;
        }

        public /* const */_type: int=100;

        public /* var */npcId: int;

        public /* var */itemBuys: Array<any>;

        public /* var */expensiveItemBuys: Array<any>;

        public /* var */itemSells: Array<any>;

        public static /* var */_regist: SRunBusinessNpc;
    }

            SRunBusinessNpc._regist = new SRunBusinessNpc(true);
        